package cn.antblog.project.tp.wx.config;

import cn.antblog.project.tp.wx.utils.WxHelper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 杨敬一
 * @date 2020-01-07
 * 设置静态参数初始化
 */
@Configuration
public class WxStaticConfig {

    @Value("${wx.appid}")
    private String appid;

    @Value("${wx.secret}")
    private String secret;

    @Bean
    public void initWxStaticConfig() {
        WxHelper.setAppid(appid);
        WxHelper.setSecret(secret);
    }
}
